import { ResponseAbcCardsInfoDto, ResponseJSONObject } from '@/types/apiType';

import request from '../utils/request';
import { RequestConfig } from '../utils/request/type';

/**
 * @description 订单详情
 * @tags order-controller
 * @summary 订单详情
 * @request get:/api/order/detail
 */
export const apiOrderDetailByGet = (params: { winId: number }, config?: RequestConfig) =>
  request.get<ResponseJSONObject>(`/api/order/detail`, params, config).then((res) => res?.result);

/**
 * @description 查询卡券
 * @tags order-controller
 * @summary 查询卡券
 * @request get:/api/order/queryCards
 */
export const apiOrderQueryCardsByGet = (params: { winId: number }, config?: RequestConfig) =>
  request
    .get<ResponseAbcCardsInfoDto>(`/api/order/queryCards`, params, config)
    .then((res) => res?.result);
